#include "bitmap.h"
#include <stdio.h>

int main(int argc, char * argv[])
{
    bitset bset;
    BIT_ZERO(&bset);
    BIT_SET(0, &bset);
    BIT_SET(1, &bset);
    BIT_SET(2, &bset);
    BIT_SET(1016, &bset);
    BIT_SET(1017, &bset);
    BIT_SET(1018, &bset);
    BIT_SET(1019, &bset);
    BIT_SET(1020, &bset);
    BIT_SET(1021, &bset);
    BIT_SET(1022, &bset);
    BIT_SET(1023, &bset);
    if (BIT_ISSET(2, &bset)) {
        printf("2 is set\n");
    } else {
        printf("2 is not set\n");
    }
    if (BIT_ISSET(3, &bset)) {
        printf("3 is set\n");
    } else {
        printf("3 is not set\n");
    }

    printf("## bitmap ##\n");
    for (int i = 0; i < 1024; i++) {
        if (i % 32 == 0) {
            putchar('\n');
        }
        BIT_ISSET(i, &bset) ? putchar('x') : putchar('.');
    }
    return 0;
}
